import NProgress from 'nprogress'
import { defineModule } from './0-ViteSSGModule'

export default defineModule(({ isClient, router }) => {
  if (isClient) {
    router.beforeEach(() => { NProgress.start() })
    router.afterEach(() => { NProgress.done() })
  }
})
